<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>应急支援申请单</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'SimHei', 'Microsoft YaHei', Arial, sans-serif;
        }

        body {
            background-color: #f0f2f5;
            padding: 20px;
            color: #333;
            font-size: 13pt;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 30px;
            border-radius: 4px;
            position: relative;
        }

        .header {
            text-align: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #1a73e8;
            position: relative;
        }

        h1 {
            font-size: 22pt;
            color: #1a73e8;
            font-weight: 600;
            letter-spacing: 2px;
            margin-bottom: 5px;
        }

        .sub-title {
            color: #5f6368;
            font-size: 12pt;
            margin-bottom: 10px;
        }

        .form-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px dashed #e0e0e0;
            font-size: 12pt;
        }

        .form-info div {
            flex: 1;
            display: flex;
            align-items: center;
        }

        .form-info span {
            display: inline-block;
            min-width: 50px;
            color: #666;
            margin-right: 5px;
        }

        .form-info input {
            border: none;
            border-bottom: 1px solid #ddd;
            padding: 4px 8px;
            text-align: center;
            font-size: 12pt;
            min-width: 220px; /* 加宽输入框 */
            max-width: 300px;
        }

        .form-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 25px;
            font-size: 12pt;
            table-layout: fixed;
        }

        .form-table col.col1 {
            width: 17%;
        }
        .form-table col.col2 {
            width: 28%;
        }
        .form-table col.col3 {
            width: 15%;
        }
        .form-table col.col4 {
            width: 40%;
        }

        .form-table td {
            padding: 10px;
            border: 1px solid #dcdcdc;
            vertical-align: middle;
            overflow-wrap: break-word;
        }

        .form-table tr:first-child td {
            border-top: 1px solid #dcdcdc !important;
        }

        .form-table tr:last-child td {
            border-bottom: 1px solid #dcdcdc !important;
        }

        .label {
            background-color: #f8f9fa;
            font-weight: bold;
            color: #202124;
            text-align: center;
        }

        .input-field {
            border: none;
            padding: 8px;
            width: 100%;
            outline: none;
            font-size: 12pt;
            background-color: transparent;
            text-align: center;
        }

        .input-field:focus {
            background-color: #f0f7ff;
        }

        textarea.input-field {
            min-height: 100px;
            resize: vertical;
            font-family: inherit;
            line-height: 1.6;
            text-align: left;
        }

        .signature-area {
            background-color: #f8f9fa;
            padding: 8px;
            border-radius: 4px;
            margin-top: 5px;
            border: 1px dashed #ccc;
        }

        .instruction {
            font-size: 10pt;
            color: #70757a;
            margin-top: 5px;
            font-style: italic;
        }

        .footer {
            text-align: center;
            color: #70757a;
            font-size: 11pt;
            padding-top: 20px;
            margin-top: 20px;
            border-top: 1px solid #eee;
        }

        td {
            white-space: normal !important;
            word-break: break-word;
        }

        .phone-input {
            width: 95% !important;
        }

        @media print {
            body {
                padding: 0;
                background-color: white;
            }

            .container {
                box-shadow: none;
                padding: 15px;
                width: 100%;
            }

            .print-btn {
                display: none;
            }
        }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <div class="sub-title">应急响应调度流程</div>
        <h1>应急支援申请单</h1>
    </div>

    <form th:object="${applyForm}" method="post">
        <div class="form-info">
            <div>
                <span>编号：</span>
                <input type="text" class="input-field" th:value="*{applyOrderId}" readonly>
            </div>
            <div style="justify-content: flex-end;">
                <span>时间：</span>
                <!-- 使用更长的输入框，确保完全显示日期 -->
                <input type="text" class="input-field" th:value="*{applyTime}" readonly style="min-width: 240px;">
            </div>
        </div>

        <table class="form-table">
            <colgroup>
                <col class="col1">
                <col class="col2">
                <col class="col3">
                <col class="col4">
            </colgroup>

            <tr>
                <td class="label">申请单位</td>
                <td colspan="3"><input type="text" class="input-field" th:value="*{deptName}" readonly></td>
            </tr>
            <tr>
                <td class="label">联系人</td>
                <td><input type="text" class="input-field" th:value="*{contact}" readonly></td>
                <td class="label">电话</td>
                <td><input type="text" class="input-field" th:value="*{contactTel}" readonly style="width:95%;"></td>
            </tr>
            <tr>
                <td class="label">主要需求</td>
                <td colspan="3">
                    <textarea class="input-field" th:text="*{requirement}" readonly></textarea>
                </td>
            </tr>
            <tr>
                <td class="label">申请单位领导审批</td>
                <td colspan="3">
                    <textarea class="input-field"></textarea>
                    <div class="signature-area">
                        <div class="instruction">（盖单位章）</div>
                        <div>
                            <span style="margin-right: 20px;">日期：</span>
                            <!--<input type="text" class="input-field" style="width: 200px; height: 30px">-->
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="label">备注</td>
                <td colspan="3">
                    <textarea class="input-field"></textarea>
                </td>
            </tr>
        </table>
    </form>

    <div class="footer">
        注：本申请单提交后需经领导审批后生效，审批通过后将安排应急支援调度。
    </div>
</div>
</body>
</html>